package com.noahplat.fourg.mapper;

import com.noahplat.datapro.pojo.Site;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/**
 * 功能：坐标mapper
 * name：宋彦磊
 * time：2021.02.25
 */

public interface SiteMapper extends Mapper<Site> {
    @Insert("INSERT INTO site_${imei} USING site TAGS(#{prod},#{model}) VALUES (#{ts},#{imei},#{site})")
    int insert(Site site);
    @Select("SELECT site FROM site_${imei} ORDER BY site_${imei}.ts DESC LIMIT 1,1; ")
    String getSite(@Param("imei") String imei);
}
